package com.jinlia.show.modules.base.model.po;

import com.jinlia.show.modules.base.wxapp.entity.PayOrder;
import com.jinlia.show.modules.base.wxapp.entity.PayOrderRecord;
import com.jinlia.show.modules.base.wxapp.entity.User;
import lombok.Data;
import org.springframework.beans.BeanUtils;

import java.util.List;

@Data
public class PayOrderPO extends PayOrder {

    private List<PayOrderRecord> payOrderRecords;

    private UserPO user;

    private Object payForEntity;

    public static PayOrderPO fromEntity(PayOrder entity) {
        PayOrderPO vo = new PayOrderPO();
        BeanUtils.copyProperties(entity, vo);
        return vo;
    }
}
